<template>
  <div class="app-container">
    <el-table
      border
      :data="tableData"
      :header-cell-style="{ textAlign: 'center' }"
      :cell-style="{ textAlign: 'center' }"
    >
      <el-table-column type="index" width="50" label="序号" />
      <el-table-column
        label="系统模块"
        prop="system_module_desc"
      ></el-table-column>
      <el-table-column prop="receiving_payment_desc" label="收支类型" />
      <el-table-column prop="business_type_desc" label="业务类型" />
      <el-table-column prop="business_id" label="业务id" />
      <el-table-column prop="receive_payment_id" label="收付款id" />
      <el-table-column prop="showname" label="名称" />
      <el-table-column prop="mobile" label="手机号" />
      <el-table-column prop="receive_payment_name" label="收/付款商户名称" />
      <el-table-column
        prop="should_receive_payment_amount"
        label="应收/付金额(元)"
      />
      <el-table-column
        prop="real_receive_payment_amount"
        label="实收/付金额(元)"
      />
      <el-table-column prop="discount_amount" label="抵扣金额(元)" />

      <el-table-column
        prop="amount_of_change_in_balance"
        label="余额变动金额(元)"
      />
      <el-table-column prop="remarks" label="备注" />
      <el-table-column label="添加时间">
        <template slot-scope="scope">
          {{ scope.row.addtime | filterTime }}
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="listQuery.pageIndex"
      :limit.sync="listQuery.pageSize"
      @pagination="getData"
    />
  </div>
</template>

<script>
export default {
  name: "CapitalFlow",
  data() {
    return {
      system_moduleEnum: {
        10: "商户端",
        20: "客户端"
      },
      listQuery: {
        pageSize: 10,
        pageIndex: 1
      },
      total: 0,
      tableData: []
    };
  },
  created() {
    this.getData();
  },
  methods: {
    async getData() {
      const res = await this.$api.finance.capitalFlow(this.listQuery);
      this.tableData = res.data.list;
      this.total = res.data.total;
    }
  }
};
</script>
